package com.example.coursehub.service;

import com.example.coursehub.entity.Material;

import java.util.List;
import java.util.Optional;

public interface MaterialService {

    Material uploadMaterial(Material material);

    List<Material> getMaterialByChapter(String chapterId);

    List<Material> getMaterialByCourseId(String courseId);

    void deleteMaterial(String materialId);

    Optional<Material> getMaterialById(String id);

    List<Material> getMaterialsByCourseAndChapter(String courseId, String chapterId);

    List<Material> findCompletedMaterialsByStudent(String userId, String chapterId);

    // 添加更新学生资料状态的方法
    void updateStudentMaterialStatus(String userId, String materialId, boolean isFinished);

    // 添加获取学生资料状态的方法
    boolean getStudentMaterialStatus(String userId, String materialId);

}